<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>实名认证</title>
        <meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
   		 <link rel="stylesheet" href="../../../style/mobile/mainO.css"/>
    </head>
<body>

<header class="header-bar header-bar-nav">
    <a class="header-icon header-left" href="javascript:;" id="backRef"></a>
    <h1 class="header-title" id="titleTest">实名认证</h1>
</header>

<!-- 认证完成 -->
<div class="auth-main">
	<ul class="">
		<li>
			<span id="idPositiveImg"><img alt="" src=" "></span>
			<p>身份证正面照</p>
		</li>
		<li>
			<span id="idNegativeImg"><img alt="" src=" "></span>
			<p>身份证反面照</p>
		</li>
		<li>
			<span id="businessLicenseImg"><img alt="" src=" "></span>
			<p>营业执照</p>
		</li>
		<li>
			<span id="holdLicenseImg"><img alt="" src=" "></span>
			<p>手持营业执照</p>
		</li>
		<li>
			<span id="storeInImg"><img alt="" src=" "></span>
			<p>店内照</p>
		</li>
		<li>
			<span id="storeOutImg"> <img alt="" src=" "> </span>
			<p>店外照</p>
		</li>
	</ul>
</div>

<!-- 认证中 -->
<div class="auth-waiting" style="display:none;">
	<img alt="" src="../../../images/mobile/bsMain/authSuccess.png">
	<p>您的账号认证中，请等候...</p>
</div>

<script src="../../../script/jquery-1.10.2.min.js"></script>
<script src="../../../script/comUr.js"></script>

<script type="text/javascript">

var sessionId = getUrlParam('sessionId');
if (sessionId){//地址栏有这些数据
	/* alert("sessionId=========" + sessionId); */
    setcache("sessionId", sessionId); //存sessionId
    console.log("链接里面的" + getcache("sessionId"));
} else {//没有从缓存里取
    sessionId = getcache("sessionId"); //sessionId
    console.log("读取缓存" + sessionId);
}

function authImg(){
	var param = {};
    var aRequestData = JSON.stringify(param);
				    
    function aSuccessFunc(data){
    	console.log(data);
    	if(data.code == '1'){
    		if(data.info.userStatus == '1'){
    			$('.auth-waiting').css('display','block');
    			$('.auth-main').css('display','none');
    		}else if(data.info.userStatus == '0'){
    			$('.auth-waiting').css('display','none');
    			$('.auth-main').css('display','block');
    			$("#idPositiveImg").html('<img alt="" src="'+ data.info.idPositiveImg +'">');//身份证正面照
            	$("#idNegativeImg").html('<img alt="" src="'+ data.info.idNegativeImg +'">');//身份证反面照
            	$("#businessLicenseImg").html('<img alt="" src="'+ data.info.businessLicenseImg +'">');//营业执照
            	$("#holdLicenseImg").html('<img alt="" src="'+ data.info.holdLicenseImg +'">');//手持营业执照
            	$("#storeInImg").html('<img alt="" src="'+ data.info.storeInImg +'">');//店内照
            	$("#storeOutImg").html('<img alt="" src="'+ data.info.storeOutImg +'">');//店外照
    		}
    	}
     }
    function aErrorFunc(){
       console.log('未知错误');
    }
    
	httpAjaxSession('POST','/mobile/index/auth', aRequestData, aSuccessFunc, aErrorFunc, aTimeOut);
}

authImg();

//返回触发
$("#backRef").click(function(){
	backRef("3");
})

function backRef(){
	window.javatojs.JSWithTypeAndJsonString("3");
}
</script>

</body>
</html>